package my.jieh.test;

import idv.jieh.commons.sql.*;
import java.sql.Connection;

/**
 * <p>Title: </p>
 *
 * <p>Description: </p>
 *
 * <p>Copyright: Copyright (c) 2005</p>
 *
 * <p>Company: </p>
 *
 * @author not attributable
 * @version 1.0
 */
class TryOracle {

  public static void main(String[] arg) throws Exception{

      SimpleConnection.registerDriver("oracle.jdbc.driver.OracleDriver");
      SimpleConnection sc = new SimpleConnection();
      sc.setProperty("user", "JAVA_DASP");
      sc.setProperty("password", "DASPJAVA");
      Connection conn = sc.getConnection("jdbc:oracle:thin:@10.129.6.18:1521:XE");

      SQLMaker sm = new SQLMaker();
//      sm.append("select * from Dialing_Queue_Table where rowid = (select min(b.rowid) from Dialing_Queue_Table b)");
      sm.append("select * from Dialing_Queue_Table where rowid = (select min(b.rowid) from Dialing_Queue_Table b WHERE CALLHANDLER=0)");
      TableCache tc = new TableCache();
      sm.generateTableCache(conn, tc);
      tc.list();

      System.out.println(tc.getAllCols());

  }
}
